﻿<Window x:Class="ListView_contains_TextBox.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid DataContext="{Binding}">
        <ListView ItemsSource="{Binding Items}" Height="212" HorizontalAlignment="Left" Margin="16,16,0,0" Name="listView1" VerticalAlignment="Top" Width="360">
            <ListView.ItemContainerStyle>
                <Style TargetType="ListViewItem">
                    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
                </Style>
            </ListView.ItemContainerStyle>
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="KEY">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBox IsReadOnly="True" Text="{Binding Key}"/>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn Header="VALUE">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBox Text="{Binding Value}"/>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                </GridView>
            </ListView.View>
        </ListView>
        <TextBox Height="24" HorizontalAlignment="Left" Margin="16,244,0,0" Name="textBox1" VerticalAlignment="Top" Width="120" />
        <TextBox Height="24" HorizontalAlignment="Left" Margin="142,244,0,0" Name="textBox2" VerticalAlignment="Top" Width="120" />
        <Button Content="追加" Height="23" HorizontalAlignment="Left" Margin="301,245,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" />
    </Grid>

</Window>
